package com.FundamentalDemos.Operator;

public class 使用加号连接字符串 {
    public static void main(String[] args) {
        //+可用于连接字符串,从左向右能算则算不能算就连在一起
        int a = 5;
        System.out.println("abc" + a);//abc5
        System.out.println(a + 5);//10
        System.out.println("hello" + a + 'a');//hello5a
        System.out.println(a + 'a' + "hello");//102hello
        System.out.println(true + "hello");
    }
}
